package com.lichuang.fruitvarietysm.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.lichuang.fruitvarietysm.user.finalproperties.Gender;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author shuaihang
 * @since 2019-05-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "User对象", description = "用户表")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户id")
    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer userId;

    @ApiModelProperty(value = "用户名")
    private String userName;

    @ApiModelProperty(value = "用户密码，MD5加密")
    private String userPassword;

    @ApiModelProperty(value = "真实姓名")
    private String userRealname;

    @ApiModelProperty(value = "用户邮箱")
    private String userEmail;

    @ApiModelProperty(value = "用户手机号")
    private String userPhone;

    @ApiModelProperty(value = "用户昵称")
    private String nickName;

    @ApiModelProperty(value = "用户头像")
    private String profilePhoto;

    @ApiModelProperty(value = "用户性别，0=未知，1=男，2=女")
    private Integer userGender;

    @ApiModelProperty(value = "用户生日")
    private LocalDate userBirthday;

    @ApiModelProperty(value = "用户居住省")
    private String dwellProvince;

    @ApiModelProperty(value = "用户居住城市")
    private String dwellCity;

    @ApiModelProperty(value = "用户居住区")
    private String dwellDistrict;

    @ApiModelProperty(value = "用户角色，0=普通用户，1=管理员")
    private Integer userRole;

    @ApiModelProperty(value = "账户状态，1=正常，2=被锁定")
    private Integer userStatus;

    @ApiModelProperty(value = "账号创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "最后一次更新时间")
    private LocalDateTime updateTime;

}
